#!/usr/bin/env ../../jshost

Stream.prototype.cat = function(){
	var x;
	while(x=s.gets())
		alert("CAT: "+x);
};

var s = new Stream();

s.fopen("out.txt", "w");
s.write("privet");
s.close();

var c = new Stream;
c.popen("dmesg");






alert("OK");